<%@ page import="cn.edu.zut.model.Book" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.edu.zut.model.BookType" %><%--
  Created by IntelliJ IDEA.
  User: 李瑞林
  Date: 2019/6/19
  Time: 16:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>图书信息修改</title>
    <link rel="stylesheet" href="/css/bookmodify.css?v=201906242">
</head>
<body>
<%!int Id;%>
<%
    Book book = (Book)request.getAttribute("bookupdate");
    List<BookType> bookTypes = (List<BookType>)request.getAttribute("booktype");
%>
<div class="base">
<div class="one">
    <form action="/bookUpdate">
        <%--<label>图书id</label><br/>--%>
        <input type="hidden" name="bookid" value=<%=book.getBookid()%>>
        <label>图书名称</label><br/><input type="text" name="bookname" value=<%=book.getBookname()%>><br/>
        <label>作者</label><br/><input type="text" name="author" value=<%=book.getAuthor()%>><br/>
        <label>出版社</label><br/><input type="text" name="publish" value=<%=book.getPublish()%>><br/>
        <label>isbn</label><br/><input type="text" name="isbn" value=<%=book.getIsbn()%>><br/>
        <label>种类</label><br/>
        <%--<input type="text" name="typeid" value=<%=book.getTypeid()%>><br/>--%>
        <select name="typeid" id="test">
            <option value="<%=book.getTypeid()%>">请选择</option>
            <%
                if(bookTypes != null && bookTypes.size() != 0){
                    for(int i = 0; i< bookTypes.size();i++){
            %>
            <option value="<%=bookTypes.get(i).getId()%>"><%=bookTypes.get(i).getTypename()%></option>
<%
}
}
%>
        </select><br/>
        <label>出版时间</label><br/><input type="text" name="publishdate" value=<%=book.getPublishdate()%>><br/>
        <label>印刷次数</label><br/><input type="text" name="publishtime" value=<%=book.getPublishtime()%>><br/>
        <label>单价</label><br/><input type="text" name="unitprice" value=<%=book.getUnitprice()%>>
        <%--<label>状态</label><br/>--%>
            <input type="hidden" name="status" value=<%=book.getStatus()%>>
        <input class="btn" type="submit" value="修   改">
    </form>
</div>
<%--<div class="two">--%>
    <%--<form action="/bookUpdateStatus">--%>
        <%--<label>修改图书状态</label><br/>--%>
        <%--<input type="hidden" name="bookid" value=<%=book.getBookid()%>>--%>
        <%--<label>状态</label><br/>--%>
        <%--<select name="status">--%>
            <%--<option value="<%=book.getStatus()%>">请选择</option>--%>
            <%--<option value="0">未借阅</option>--%>
            <%--<option value="1">已借阅</option>--%>
        <%--</select><br/>--%>
        <%--<input class="btn" type="submit" value="修   改">--%>
    <%--</form>--%>
<%--</div>--%>
</div>
</body>
</html>
